package com.xbongbong.paas.service.recheck;

import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.pojo.dto.FormDataRepeatDTO;
import com.xbongbong.paas.pojo.vo.CheckRepeatVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.recheck.pojo.dto.RecheckAddEditDTO;
import org.elasticsearch.index.query.BoolQueryBuilder;

import java.util.List;

public interface RecheckingAddEditService {

    /**
     * 业务类型
     * @return
     */
    Integer businessType();

    /**
     * @description 设置各自业务的特殊传参
     * @author yanglei
     * @date 2022/11/24 9:20
     * @param formDataRepeatDTO
     * @param recheckAddEditDTO
     * @param checkRepeatVO
     */
    void setSpecialRecheckAddEditDTO(FormDataRepeatDTO formDataRepeatDTO, RecheckAddEditDTO recheckAddEditDTO, CheckRepeatVO checkRepeatVO)  throws XbbException;

    /**
     * @description 系统单行文本字段处理
     * @author yanglei
     * @date 2022/11/24 9:19
     * @param recheckAddEditDTO
     * @param checkToolBoolQuery
     * @param noRepeatBoolQuery
     */
    void handleSystemAttrQueryBuilder(RecheckAddEditDTO recheckAddEditDTO, BoolQueryBuilder checkToolBoolQuery,BoolQueryBuilder noRepeatBoolQuery) throws XbbException;
    /**
     * @description 自定义单行文本字段处理
     * @author yanglei
     * @date 2022/11/24 9:19
     * @param recheckAddEditDTO
     * @param checkToolBoolQuery
     * @param noRepeatBoolQuery
     */
    void handleCustomAttrQueryBuilder(RecheckAddEditDTO recheckAddEditDTO, BoolQueryBuilder checkToolBoolQuery,BoolQueryBuilder noRepeatBoolQuery) throws XbbException;

    /**
     * @description es查询结果
     * @author yanglei
     * @date 2022/11/24 9:19
     * @param recheckAddEditDTO
     * @param boolQueryBuilder
     * @return List<PaasFormDataEntityExt>
     */
    List<PaasFormDataEntityExt> queryResult(RecheckAddEditDTO recheckAddEditDTO,BoolQueryBuilder boolQueryBuilder) throws XbbException;

    /**
     * @description 结果集处理
     * @author yanglei
     * @date 2022/11/16 19:48
     * @param recheckAddEditDTO
     * @return
     */
    CheckRepeatVO resultDeal(RecheckAddEditDTO recheckAddEditDTO) throws XbbException;


}
